<?php
set_time_limit(180);
$baseUrl = 'http://api.mobypicture.com/';
$url = $baseUrl."?";
foreach ($_REQUEST as $key => $value) {
	$url .= "&".urlencode($key)."=".urlencode($value);
}
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 180);
$response = curl_exec($ch);
$callback = $_REQUEST['callback'];
header('Content-Type: application/json');
echo $callback."(".$response.");";
?>